<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<p:panel header="Location">
		<h:panelGrid columns="2">
			<p:outputLabel for="fromLocation" value="From: " />
			<p:selectOneMenu id="fromLocation"
				value="#{locationView.fromSelected}" style="width:150px">
				<p:ajax update="toLocation" listener="#{locationView.onFromChange}" />
				<f:selectItem itemLabel="" itemValue="" noSelectionOption="true" />
				<f:selectItems value="#{locationView.from}" />
			</p:selectOneMenu>

			<p:outputLabel for="toLocation" value="To: " />
			<p:selectOneMenu id="toLocation" value="#{locationView.toSelected}"
				style="width:150px">
				<f:selectItem itemLabel="" itemValue="" noSelectionOption="true" />
				<f:selectItems value="#{locationView.to}" />
			</p:selectOneMenu>
		</h:panelGrid>
	</p:panel>
</ui:composition>
</html>